<?php
//print_r($this->cart->contents());
/*
$total_qty=0;
foreach ($this->cart->contents() as $c)
{
	$total_qty+=$c["qty"];
}
*/
$total_qty=$this->cart->total_items();

?>
<?php include_once '_header.php';?>

<body id="index" class=" ">
<div id="page" class="clearfix">
  <div class="navbar navbar-static top-links first-bg" >
    <div class="navbar-inner container_9">
      <ul id="header_nav" class="nav pull-left">
        <li ><i class="icon-user"></i> <a href="#">My Account</a></li>
        <li><i class="icon-heart"></i> <a href="/">Wishlist </a></li>
      </ul>
      <ul id="header_nav" class="nav pull-right">
        <li ><i class="icon-shopping-cart"></i> <a href="<?php echo base_url().'client/cart/yourcart/'?>">Shopping Cart</a></li>
        <li><i class="icon-circle-arrow-right"></i> <a href="/">Checkout </a></li>
      </ul>
    </div>
  </div>
  
  <!-- Header -->
  
  <header id="header" role="heading" class="third-bg" >
    <div class="header-content container_9"> <a title="onlinestore" href="home.html" class="logo "><img alt="logo" src="media/logo.jpg"></a>
      <div class="quick-access">
        <ul>
          <li > <a rel="nofollow" title="View my shopping cart" href="/" class="cart-btn first-bg" > <i class="icon-exchange"></i> </a> </li>
          <li > <a rel="nofollow" title="View my shopping cart" href="/" class="cart-btn  first-bg" > <i class="icon-shopping-cart"></i> </a> <span><span id="cart_qty"><?php echo $total_qty; ?></span> item(s) </span> </li>
        </ul>
      </div>
      <form method="post" action="<?php echo base_url()."/client/product/recherche"?>" id="searchbox">
        <p>
          <input type="text" placeholder="Type and hit enter" value="" name="key">
          <input type="submit" value="find" >
        </p>
      </form>
    </div>
    <script src="js/jquery.dlmenu.js"></script> 
    <script>
    /*
			$(function() {
	 $( '#dl-menu' ).dlmenu();
				
	 $(".sf-menu li.item").hover(
      function () {
       
	   $(this).children('a').addClass('hover');
      },
      function () {
          $(this).children('a').removeClass('hover');
      }
    );
	
	
			});*/
</script>
    <div id="dl-menu" class="dl-menuwrapper" style="display:none;">
      <button class="dl-trigger">Open Menu</button>
      <ul class="dl-menu">
        <li> <a href="#">Fashion</a>
          <ul class="dl-submenu">
            <li> <a href="#">Men</a>
              <ul class="dl-submenu">
                <li><a href="product-list.html">Shirts</a></li>
                <li><a href="product-list.html">Jackets</a></li>
                <li><a href="product-list.html">Chinos &amp; Trousers</a></li>
                <li><a href="product-list.html">Jeans</a></li>
                <li><a href="product-list.html">T-Shirts</a></li>
                <li><a href="product-list.html">Underwear</a></li>
              </ul>
            </li>
            <li> <a href="#">Women</a>
              <ul class="dl-submenu">
                <li><a href="product-list.html">Jackets</a></li>
                <li><a href="product-list.html">Knits</a></li>
                <li><a href="product-list.html">Jeans</a></li>
                <li><a href="product-list.html">Dresses</a></li>
                <li><a href="product-list.html">Blouses</a></li>
                <li><a href="product-list.html">T-Shirts</a></li>
                <li><a href="product-list.html">Underwear</a></li>
              </ul>
            </li>
            <li> <a href="#">Children</a>
              <ul class="dl-submenu">
                <li><a href="product-list.html">Boys</a></li>
                <li><a href="product-list.html">Girls</a></li>
              </ul>
            </li>
          </ul>
        </li>
        <li> <a href="#">Electronics</a>
          <ul class="dl-submenu">
            <li><a href="product-list.html">Camera &amp; Photo</a></li>
            <li><a href="product-list.html">TV &amp; Home Cinema</a></li>
            <li><a href="product-list.html">Phones</a></li>
            <li><a href="product-list.html">PC &amp; Video Games</a></li>
          </ul>
        </li>
        <li> <a href="#">Furniture</a>
          <ul class="dl-submenu">
            <li> <a href="product-list.html">Living Room</a>
              <ul class="dl-submenu">
                <li><a href="product-list.html">Sofas &amp; Loveseats</a></li>
                <li><a href="product-list.html">Coffee &amp; Accent Tables</a></li>
                <li><a href="product-list.html">Chairs &amp; Recliners</a></li>
                <li><a href="product-list.html">Bookshelves</a></li>
              </ul>
            </li>
            <li> <a href="#">Bedroom</a>
              <ul class="dl-submenu">
                <li> <a href="#">Beds</a>
                  <ul class="dl-submenu">
                    <li><a href="product-list.html">Upholstered Beds</a></li>
                    <li><a href="product-list.html">Divans</a></li>
                    <li><a href="product-list.html">Metal Beds</a></li>
                    <li><a href="product-list.html">Storage Beds</a></li>
                    <li><a href="product-list.html">Wooden Beds</a></li>
                    <li><a href="product-list.html">Children's Beds</a></li>
                  </ul>
                </li>
                <li><a href="#">Bedroom Sets</a></li>
                <li><a href="#">Chests &amp; Dressers</a></li>
              </ul>
            </li>
            <li><a href="#">Home Office</a></li>
            <li><a href="#">Dining &amp; Bar</a></li>
            <li><a href="#">Patio</a></li>
          </ul>
        </li>
        <li> <a href="#">Jewelry &amp; Watches</a>
          <ul class="dl-submenu">
            <li><a href="product-list.html">Fine Jewelry</a></li>
            <li><a href="product-list.html">Fashion Jewelry</a></li>
            <li><a href="product-list.html">Watches</a></li>
            <li> <a href="product-list.html">Wedding Jewelry</a>
              <ul class="dl-submenu">
                <li><a href="product-list.html">Engagement Rings</a></li>
                <li><a href="product-list.html">Bridal Sets</a></li>
                <li><a href="product-list.html">Women's Wedding Bands</a></li>
                <li><a href="product-list.html">Men's Wedding Bands</a></li>
              </ul>
            </li>
          </ul>
        </li>
      </ul>
    </div>
  </header>
<?php include_once 'nav.php';?>
  <div class="category-full-image"> 
    

    <ul class="category-slider">
      <li> <img src="media/page-title-bg.jpg" ></li>
    </ul>
  </div>
  <div class="container_9 title-container">
    <div class="page-title first-bg"> <?php echo $sectorname; ?> </div>
    <div class="breadcrumb"> <a title="return to Home" href="/">Home</a> <span class="navigation-pipe">/</span> <span class="navigation_page">Living Room</span> </div>
  </div>
  <section  id="columns" class="container_9 clearfix col2-right"> 
    
    <!-- Center -->
    <article id="center_column" class=" grid_5">
      <div class="toolbar">
        <div class="sort-select">
          <label>Sort by</label>
          <select class="selectBox">
            <option>Position</option>
          </select>
        </div>
        <div class="sort-select">
          <label>Show</label>
          <select class="selectBox">
            <option>5 per page</option>
               <option>7 per page</option>
                  <option>9 per page</option>
          </select>
        </div>
        <div class="lg-panel htabs">
        </div>
      
      <?php 
      $i=0;
      foreach ($listproduct as $ls)
	  	{
	  		if($i%3==0)
	  		{
	  ?>			
	 	 <ul class="products-grid">
	 	  <li class="item first fadeIn animated"> <a rel="prettyPhoto[pp_gal]" class="fa-search-btn first-bg"  href="<?php echo base_url()."products/".$ls["ItemCode"].".jpg" ?>"> enlarge image <i class="icon-search"></i></a> <a class="product-image" title="Product Name" href="product.html"> <img src="<?php echo base_url()."products/".$ls["ItemCode"].".jpg" ?>" width="249" height="180" alt="product"></a>
          <h2 class="product-name"> <a title="Product Name" href="product.html"> <?php echo $ls["Description"] ?> </a> </h2>
          <div class="actions"> <a class="btn-circle first-bg-hover"> <i class="icon-heart"></i> </a> <a class="btn-circle  cart first-bg-hover" id="p-<?php echo $ls["idproducts"];?>" > <i class="icon-shopping-cart"></i> </a> <a class="btn-circle first-bg-hover"> <i class="icon-exchange"></i> </a> </div>
        </li>
	  <?php 
	  		}
	  	if($i%3==1)
	  	{	
	  		
	  ?>
    
	 	  <li class="item fadeIn animated"> <a rel="prettyPhoto[pp_gal]" class="fa-search-btn first-bg"  href="<?php echo base_url()."products/".$ls["ItemCode"].".jpg" ?>"> enlarge image <i class="icon-search"></i></a> <a class="product-image" title="Product Name" href="product.html"> <img src="<?php echo base_url()."products/".$ls["ItemCode"].".jpg" ?>" width="249" height="180" alt="product"></a>
          <h2 class="product-name"> <a title="Product Name" href="product.html"> <?php echo $ls["Description"] ?>  </a> </h2>
          <div class="actions"> <a class="btn-circle first-bg-hover"> <i class="icon-heart"></i> </a> <a class="btn-circle  cart  first-bg-hover" id="p-<?php echo $ls["idproducts"];?>" > <i class="icon-shopping-cart"></i> </a> <a class="btn-circle first-bg-hover"> <i class="icon-exchange"></i> </a> </div>
          </li>
       
      <?php } if($i%3==2)
	  		{?>  
   		 <li class="item last fadeIn animated"> <a rel="prettyPhoto[pp_gal]" class="fa-search-btn first-bg"  href="<?php echo base_url()."products/".$ls["ItemCode"].".jpg" ?>"> enlarge image <i class="icon-search"></i></a> <a class="product-image" title="Product Name" href="product.html"> <img src="<?php echo base_url()."products/".$ls["ItemCode"].".jpg" ?>" width="249" height="180" alt="product"></a>
          <h2 class="product-name"> <a title="Product Name" href="product.html"> <?php echo $ls["Description"] ?> </a> </h2>
          <div class="actions"> <a class="btn-circle first-bg-hover"> <i class="icon-heart"></i> </a> <a class="btn-circle cart  first-bg-hover" id="p-<?php echo $ls["idproducts"];?>"> <i class="icon-shopping-cart"></i> </a> <a class="btn-circle first-bg-hover"> <i class="icon-exchange"></i> </a> </div>
          </li>
       
   			 </ul>
   		 <?php }?>    
       <?php 
       		$i++;
	  		  	} ?>
      </ul>
      <div class="pagination">
        <div class="item-total"> </div>
        <ul>
        <!--  
          <li><a href="#">«</a></li>
          <li class="active first-bg-hover" ><a href="#">1</a></li>
          <li><a href="#">2</a></li>
          <li><a href="#">3</a></li>
          <li><a href="#">4</a></li>
          <li><a href="#">5</a></li>
          <li><a href="#">»</a></li>
          -->
          <?php echo $link; ?>
        </ul>
      </div>
    </article>
    
    <!-- Right -->
    <aside id="right_column" class="column grid_2 omega"> 
      
      <!-- Block categories module -->
      <div id="categories_block_left" class="block">
        <h4 class="title_block">Categories</h4>
        <div class="block_content">
          <ul class="tree dhtml">
          <?php $query=$this->db->get("categories");
          $listcatgorie=$query->result_array();
          	foreach ($listcatgorie as $lc){
          ?>
          
            <li > <a href="<?php echo base_url()."client/product/productsbycategories/".$lc["catecode"] ?>"  title=""><?php echo $lc["descptions"]?></a></li>
           <?php } ?> 
              </ul>
            </li>
          </ul>
        </div>
      </div>
      <!-- /Block categories module --> 
      
      <!-- Block CMS module -->
      <div class="block" id="layered_block_left">
        <h4 class="title_block">Filter By</h4>
        <div class="block_content">
          <form id="layered_form" action="#">
            <div>
            <div> <span class="layered_subtitle">country</span>
              <div class="clear"></div>
              <ul class="Hide" id="ul_layered_category_0" >
                <li>
                   <input type="checkbox" id="layered_category_1" class="checkbox">
                  <label for="layered_category_1"> Jackets<span> (1)</span> </label>
                </li>
                <li>
                  <input type="checkbox" id="layered_category_2" class="checkbox">
                  <label for="layered_category_2"> Chairs <span> (10)</span> </label>
                </li>
                <li>
                  <input type="checkbox" id="layered_category_3" class="checkbox">
                  <label for="layered_category_3"> Kids & Babies<span> (1)</span> </label>
                </li>
                <li>
                  <input type="checkbox" id="layered_category_4" class="checkbox">
                  <label for="layered_category_4"> Electronics <span> (1)</span></label>
                </li>
                <li>
                  <input type="checkbox" id="layered_category_5" class="checkbox">
                  <label for="layered_category_5"> Jackets<span> (1)</span></label>
                </li>
              </ul>
            </div>
            <div> <span class="layered_subtitle">Condition</span>
              <div class="clear"></div>
              <ul class="Hide" id="ul_layered_condition_0" >
                <li >
                  <input type="checkbox" id="layered_Condition_1" class="checkbox">
                  <label for="layered_Condition_1"> New<span> (1)</span></label>
                </li>
                <li >
                  <input type="checkbox" id="layered_Condition_2" class="checkbox">
                  <label for="layered_Condition_2">Old<span> (1)</span></label>
                </li>
              </ul>
            </div>
            
            <!-- bxSlider Javascript file --> 
            <script src="js/jquery.slider.min.js"></script> 
            
            <!-- Javascripts All --> 
            <script src="js/scripts.js"></script> 
            <!-- Javascripts --> 
            <script src="js/jquery.nouislider.min.js"></script>
            <link rel="stylesheet" href="css/nouislider.fox.css" type="text/css" media="screen" />
            <div class="layered_price"> <span class="layered_subtitle">Price</span>
              <div class="clear"></div>
              <ul id="ul_layered_price_0" class="Hide">
                <div class="section-body">
                  <div class="range-slider-container">
                    <div class="range-slider"></div>
                    <div class="range-slider-value clearfix"> <span class="min"></span> <span class="max"></span> </div>
                  </div>
                </div>
              </ul>
            </div>
          </form>
        </div>
      </div>
    </aside>
  </section>
  <div class="footer-info first-bg">
    <div class="container_9 clearfix">
      <p><a href="/"><img src="media/footer-banner.png" alt=""></a></p>
    </div>
  </div>
  
  <!-- Footer -->
  <footer id="footer" class="clearfix second-bg">
    <div class="footer-wrap container_9 ">
      <div class="footer-set">
        <div class="block">
          <h4>Customer Service</h4>
          <div class="block_content">
            <ul>
              <li class="first_item"><a title="Specials" href="index.php?controller=prices-drop">Specials</a></li>
              <li class="item"><a title="New products" href="index.php?controller=new-products">New products</a></li>
              <li class="item"><a title="Best sellers" href="index.php?controller=best-sales">Best sellers</a></li>
              <li class="item"><a title="Our stores" href="index.php?controller=stores">Our stores</a></li>
              <li class="item"><a title="Contact us" href="index.php?controller=contact">Contact us</a></li>
            </ul>
          </div>
        </div>
        <div class="block">
          <h4>Information</h4>
          <div class="block_content">
            <ul>
              <li class="item"><a title="Delivery" href="index.php?id_cms=1&amp;controller=cms&amp;id_lang=1">Delivery</a></li>
              <li class="item"><a title="Legal Notice" href="index.php?id_cms=2&amp;controller=cms&amp;id_lang=1">Legal Notice</a></li>
              <li class="item"><a title="About us" href="index.php?id_cms=4&amp;controller=cms&amp;id_lang=1">About us</a></li>
              <li><a title="Sitemap" href="index.php?controller=sitemap">Sitemap</a></li>
            </ul>
          </div>
        </div>
        <div class="block">
          <h4>My account</h4>
          <div class="block_content">
            <ul>
              <li><a href="index.php?controller=history">My orders</a></li>
              <li><a href="index.php?controller=order-slip">My credit slips</a></li>
              <li><a href="index.php?controller=addresses">My addresses</a></li>
              <li><a href="index.php?controller=identity">My personal info</a></li>
            </ul>
          </div>
        </div>
        <div class="block last">
          <h4>Contact us</h4>
          <div class="block_content">
            <p><a href="mailto:prestazilla@gmail.com">prestazilla@gmail.com</a> <br />
              +38649 123 456 789 00<br />
              Lorem ipsum address street no 24 b41</p>
          </div>
        </div>
      </div>
      <footer id="footer-absolute" class="clearfix"> <a  id="scroll-top-img"  href="#" class="go-top first-bg" > <img src="images/scrolltop.png"  /></a>
        <div class="copy">
          <p>© 2013 onlinestore , All Rights Reserved</p>
        </div>
        <div class="social">
          <p><a href="#"> <em class="icon-facebook"><span>icon</span></em></a> <a href="#"><em class="icon-twitter"><span>icon</span></em></a> <a href="#"><em class="icon-rss"><span>icon</span></em></a> <a href="#"><em class="icon-pinterest"><span>icon</span></em></a> <a href="#"><em class="icon-google-plus"><span>icon</span></em></a></p>
        </div>
      </footer>
    </div>
  </footer>
</div>
</body>
</html>
<script>

	 $(".cart").click(function(){
	
	var get_idproduct=$(this).attr("id");
	var idproducts=get_idproduct.replace("p-","");
	
	$.ajax({
	type: "get",
	url: "<?php echo base_url()."fr/client/product/findcart/"?>"+idproducts
	}).done(function( data ) 
			{
				$("#cart_qty").html(data);
			});
	


});	
</script>	  		  	
